// 购物车模块对应接口
import { request } from '@/api/index.js'

// 增加购物车商品的接口请求
export const useAddShoopingCartService = (data) => {
  return request({
    url: '/cart/add',
    method: 'post',
    data
  })
}
// 获取购物车数据的接口请求
export const useGetShoppingCartListService = () => {
  return request.get('/cart/list')
}

// 购物车商品更新的接口请求
export const useUpdateShoppingCartService = (data) => {
  return request.post('/cart/update', data)
}

// 删除购物车商品
export const useDelShoppingCartService = async (data) => {
  return request.post('/cart/clear', data)
}
